package menu

import (
	"time"
)

const TBNMenu = "menu"

type TblMenu struct {
	Id        int64      `json:"id"`
	CreateAt  *time.Time `json:"createAt"`
	Pid       int64      `orm:"comment:上级菜单ID" json:"pid"`
	Roles     string     `orm:"varchar(100);comment:拥有权限的角色，逗号隔开" json:"roles"`
	Seq       int        `orm:"tinyint;comment:序号，增序" json:"seq"`
	Title     string     `orm:"varchar(10)" json:"title"`
	Icon      string     `orm:"varchar(30)" json:"icon"`
	Path      string     `orm:"varchar(30)" json:"path"`
	Hidden    bool       `orm:"tinyint;comment:是否在菜单栏隐藏" json:"hidden"`
	Component string     `orm:"varchar(100);comment:页面文件路径" json:"component"`
}

func (m *TblMenu) TableName() string {
	return TBNMenu
}
